package com.rd.student.jiaji.class1.wangyufang.day0809;

import java.util.Scanner;

public class Test1 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int j = scanner.nextInt();
        int j1 = scanner.nextInt();
        int j2 = scanner.nextInt();
        int j3 = scanner.nextInt();
        int j4 = scanner.nextInt();
        int j5 = scanner.nextInt();
        System.out.print("加密前：");
        System.out.print(j);
        System.out.print(j1);
        System.out.print(j2);
        System.out.print(j3);
        System.out.print(j4);
        System.out.println(j5);

        int[] i = new int[6];

        i[0] = (j + 6) % 12;
        i[1] = (j1 + 6) % 12;
        i[2] = (j2 + 6) % 12;
        i[3] = (j3 + 6) % 12;
        i[4] = (j4 + 6) % 12;
        i[5] = (j5 + 6) % 12;
        int i1 = i[0] + i[5];
        i[0] = i1 - i[0];
        i[5] = i1 - i[0];
        int i2 = i[1] + i[4];
        i[1] = i2 - i[1];
        i[4] = i2 - i[1];
        int i3 = i[2] + i[3];
        i[2] = i3 - i[2];
        i[3] = i3 - i[2];
        System.out.print("加密后：");
        System.out.print(i[0]);
        System.out.print(i[1]);
        System.out.print(i[2]);
        System.out.print(i[3]);
        System.out.print(i[4]);
        System.out.println(i[5]);

        i[0] = (i[0] + 6) % 12;
        i[1] = (i[1] + 6) % 12;
        i[2] = (i[2] + 6) % 12;
        i[3] = (i[3]+ 6) % 12;
        i[4] = (i[4]+ 6) % 12;
        i[5] = (i[5]+ 6) % 12;
        int i11 = i[0] + i[5];
        i[0] = i11 - i[0];
        i[5] = i11 - i[0];
        int i22 = i[1] + i[4];
        i[1] = i22 - i[1];
        i[4] = i22 - i[1];
        int i33 = i[2] + i[3];
        i[2] = i33 - i[2];
        i[3] = i33 - i[2];
        System.out.print("加密后：");
        System.out.print(i[0]);
        System.out.print(i[1]);
        System.out.print(i[2]);
        System.out.print(i[3]);
        System.out.print(i[4]);
        System.out.println(i[5]);

    }
}
